import request from '@/utils/request'

// 查询文章表的增删改查列表
export function listArticle(data) {
  return request({
    url: '/els/testElastic/highlightList',
    method: 'post',
    data: data
  })
}


// 查询补全接口
export function getArticleSuggestionText(data) {
  return request({
    url: '/els/testElastic/getArticleSuggestionText',
    method: 'post',
    data: data
  })
}

// 查询文章表的增删改查详细
export function getArticle(id) {
  return request({
    url: '/article/basis/' + id,
    method: 'get'
  })
}

// 新增文章表的增删改查
export function addArticle(data) {
  return request({
    url: '/article/add',
    method: 'post',
    data: data
  })
}
// 全部数据刷入es
export function addArticleAll(data) {
  return request({
    url: '/article/addAll',
    method: 'post',
    data: data
  })
}

// 修改文章表的增删改查
export function updateArticle(data) {
  return request({
    url: '/article/basis',
    method: 'put',
    data: data
  })
}

// 删除文章表的增删改查
export function delArticle(data) {
  return request({
    url: '/article/deleteArticle',
    method: 'post',
    data: data
  })
}
